
public class TestList {
    public static void main(String[] args) {
        MyArrayList myArrayList = new MyArrayList();
        myArrayList.add(1);
        myArrayList.add(2);
        myArrayList.add(3);
        myArrayList.display();
        try {
            myArrayList.add(1, 10);
        } catch (PosWrongfulException e) {
            e.printStackTrace();
        }
        myArrayList.display();
        System.out.println("=============");
        System.out.println(myArrayList.contains(10));
        System.out.println(myArrayList.contains(4100));
        System.out.println(myArrayList.indexOf(2));
    }
}
